"""project name：xuda's first time

   name:徐炟

   student number:20193221

   time:2020.3.8
"""

print("已知：E(x)=(5x+8) mod 26函数，解密函数就是D(x) = 21(x - 8) mod 26 。")
x =int(input("please input a number:"))
y = (5 * x + 8) % 26
D = 21*( y - 8 ) % 26
print(" x ==",D)


print("求等比数列的和")
a = int(input("please input a:"))
n = int(input("please input n:"))
q = int(input("please input q:"))
s = a * ((q**n) -1) / (q -1)
print("等比数列的和为：",s)

